<?php
//function to connet the database
function dbconnect() {
	global $_SGLOBAL, $_SC;
	if(empty($_SGLOBAL['db'])) {
		include_once(S_ROOT.'class/class.mysql.php');
		$_SGLOBAL['db'] = new mysql();
		$_SGLOBAL['db']->charset = $_SC['dbcharset'];
		$_SGLOBAL['db']->connect($_SC['dbhost'], $_SC['dbuser'], $_SC['dbpwd'], $_SC['dbname'], $_SC['pconnect']);
	}
}

//function to add database table prefix
function tname($name) {
	global $_SC;
	return $_SC['tablepre'].$name;
}

//function to get language 
function lang($description){
	global $_LANG;
	return $_LANG[$description];
}

?>